namespace ns0
{
    using DukeyTbker.Properties;
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Threading;
    using System.Web.Services;
    using System.Web.Services.Description;
    using System.Web.Services.Protocols;

    [GeneratedCode("System.Web.Services", "2.0.50727.5420"), DesignerCategory("code"), WebServiceBinding(Name="dukeyauthSoap", Namespace="http://www.dukeycms.com/"), DebuggerStepThrough]
    public class dukeyauth : SoapHttpClientProtocol
    {
        private SendOrPostCallback AuthUserOperationCompleted;
        private SendOrPostCallback AuthUserTbkSoftOperationCompleted;
        private SendOrPostCallback MatchImgPathOperationCompleted;
        private SendOrPostCallback SffAuthUserOperationCompleted;
        private bool useDefaultCredentialsSetExplicitly;

        public event AuthUserCompletedEventHandler AuthUserCompleted;

        public event AuthUserTbkSoftCompletedEventHandler AuthUserTbkSoftCompleted;

        public event MatchImgPathCompletedEventHandler MatchImgPathCompleted;

        public event SffAuthUserCompletedEventHandler SffAuthUserCompleted;

        public dukeyauth()
        {
            this.Url = Settings.Default.DukeyTbker_com_dukeycms_www_dukeyauth;
            if (this.IsLocalFileSystemWebService(this.Url))
            {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else
            {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }

        [SoapDocumentMethod("http://www.dukeycms.com/AuthUser", RequestNamespace="http://www.dukeycms.com/", ResponseNamespace="http://www.dukeycms.com/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
        public string AuthUser(string email, string machinekey, string regcode, string string_0, ref string authtip, int version)
        {
            object[] objArray2 = base.Invoke("AuthUser", new object[] { email, machinekey, regcode, string_0, authtip, version });
            authtip = (string) objArray2[1];
            return (string) objArray2[0];
        }

        public void AuthUserAsync(string email, string machinekey, string regcode, string string_0, string authtip, int version)
        {
            this.AuthUserAsync(email, machinekey, regcode, string_0, authtip, version, null);
        }

        public void AuthUserAsync(string email, string machinekey, string regcode, string string_0, string authtip, int version, object userState)
        {
            if (this.AuthUserOperationCompleted == null)
            {
                this.AuthUserOperationCompleted = new SendOrPostCallback(this.OnAuthUserOperationCompleted);
            }
            base.InvokeAsync("AuthUser", new object[] { email, machinekey, regcode, string_0, authtip, version }, this.AuthUserOperationCompleted, userState);
        }

        [SoapDocumentMethod("http://www.dukeycms.com/AuthUserTbkSoft", RequestNamespace="http://www.dukeycms.com/", ResponseNamespace="http://www.dukeycms.com/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
        public string AuthUserTbkSoft(string email, string machinekey, string regcode, string string_0, ref string authtip, int version)
        {
            object[] objArray2 = base.Invoke("AuthUserTbkSoft", new object[] { email, machinekey, regcode, string_0, authtip, version });
            authtip = (string) objArray2[1];
            return (string) objArray2[0];
        }

        public void AuthUserTbkSoftAsync(string email, string machinekey, string regcode, string string_0, string authtip, int version)
        {
            this.AuthUserTbkSoftAsync(email, machinekey, regcode, string_0, authtip, version, null);
        }

        public void AuthUserTbkSoftAsync(string email, string machinekey, string regcode, string string_0, string authtip, int version, object userState)
        {
            if (this.AuthUserTbkSoftOperationCompleted == null)
            {
                this.AuthUserTbkSoftOperationCompleted = new SendOrPostCallback(this.OnAuthUserTbkSoftOperationCompleted);
            }
            base.InvokeAsync("AuthUserTbkSoft", new object[] { email, machinekey, regcode, string_0, authtip, version }, this.AuthUserTbkSoftOperationCompleted, userState);
        }

        public void CancelAsync(object userState)
        {
            base.CancelAsync(userState);
        }

        private bool IsLocalFileSystemWebService(string string_0)
        {
            if ((string_0 == null) || (string_0 == string.Empty))
            {
                return false;
            }
            Uri uri = new Uri(string_0);
            return ((uri.Port >= 0x400) && (string.Compare(uri.Host, "localHost", StringComparison.OrdinalIgnoreCase) == 0));
        }

        [SoapDocumentMethod("http://www.dukeycms.com/MatchImgPath", RequestNamespace="http://www.dukeycms.com/", ResponseNamespace="http://www.dukeycms.com/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
        public string[] MatchImgPath(string content, string regexPattern, int version, ref string string_0)
        {
            object[] objArray2 = base.Invoke("MatchImgPath", new object[] { content, regexPattern, version, string_0 });
            string_0 = (string) objArray2[1];
            return (string[]) objArray2[0];
        }

        public void MatchImgPathAsync(string content, string regexPattern, int version, string string_0)
        {
            this.MatchImgPathAsync(content, regexPattern, version, string_0, null);
        }

        public void MatchImgPathAsync(string content, string regexPattern, int version, string string_0, object userState)
        {
            if (this.MatchImgPathOperationCompleted == null)
            {
                this.MatchImgPathOperationCompleted = new SendOrPostCallback(this.OnMatchImgPathOperationCompleted);
            }
            base.InvokeAsync("MatchImgPath", new object[] { content, regexPattern, version, string_0 }, this.MatchImgPathOperationCompleted, userState);
        }

        private void OnAuthUserOperationCompleted(object object_0)
        {
            if (this.AuthUserCompleted != null)
            {
                InvokeCompletedEventArgs args = (InvokeCompletedEventArgs) object_0;
                this.AuthUserCompleted(this, new AuthUserCompletedEventArgs(args.Results, args.Error, args.Cancelled, args.UserState));
            }
        }

        private void OnAuthUserTbkSoftOperationCompleted(object object_0)
        {
            if (this.AuthUserTbkSoftCompleted != null)
            {
                InvokeCompletedEventArgs args = (InvokeCompletedEventArgs) object_0;
                this.AuthUserTbkSoftCompleted(this, new AuthUserTbkSoftCompletedEventArgs(args.Results, args.Error, args.Cancelled, args.UserState));
            }
        }

        private void OnMatchImgPathOperationCompleted(object object_0)
        {
            if (this.MatchImgPathCompleted != null)
            {
                InvokeCompletedEventArgs args = (InvokeCompletedEventArgs) object_0;
                this.MatchImgPathCompleted(this, new MatchImgPathCompletedEventArgs(args.Results, args.Error, args.Cancelled, args.UserState));
            }
        }

        private void OnSffAuthUserOperationCompleted(object object_0)
        {
            if (this.SffAuthUserCompleted != null)
            {
                InvokeCompletedEventArgs args = (InvokeCompletedEventArgs) object_0;
                this.SffAuthUserCompleted(this, new SffAuthUserCompletedEventArgs(args.Results, args.Error, args.Cancelled, args.UserState));
            }
        }

        [SoapDocumentMethod("http://www.dukeycms.com/SffAuthUser", RequestNamespace="http://www.dukeycms.com/", ResponseNamespace="http://www.dukeycms.com/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
        public string SffAuthUser(string email, string machinekey, string regcode, string string_0, ref string authtip, int version)
        {
            object[] objArray2 = base.Invoke("SffAuthUser", new object[] { email, machinekey, regcode, string_0, authtip, version });
            authtip = (string) objArray2[1];
            return (string) objArray2[0];
        }

        public void SffAuthUserAsync(string email, string machinekey, string regcode, string string_0, string authtip, int version)
        {
            this.SffAuthUserAsync(email, machinekey, regcode, string_0, authtip, version, null);
        }

        public void SffAuthUserAsync(string email, string machinekey, string regcode, string string_0, string authtip, int version, object userState)
        {
            if (this.SffAuthUserOperationCompleted == null)
            {
                this.SffAuthUserOperationCompleted = new SendOrPostCallback(this.OnSffAuthUserOperationCompleted);
            }
            base.InvokeAsync("SffAuthUser", new object[] { email, machinekey, regcode, string_0, authtip, version }, this.SffAuthUserOperationCompleted, userState);
        }

        public string Url
        {
            get
            {
                return base.Url;
            }
            set
            {
                if ((this.IsLocalFileSystemWebService(base.Url) && !this.useDefaultCredentialsSetExplicitly) && !this.IsLocalFileSystemWebService(value))
                {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }

        public bool UseDefaultCredentials
        {
            get
            {
                return base.UseDefaultCredentials;
            }
            set
            {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
    }
}

